package com.zthz.douxing

class FrequentContact {

    String name

    String mobileNo
    //static hasMany = [address: Address]
    String seq //用于表示排序index

    String address

    static hasOne = [personOwner: Person]

    static constraints = {

        address nullable: true

        seq nullable: false

        name nullable:false

        mobileNo nullable: false

    }
    static mapping = {

        mobileNo unique: true

    }




    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("FrequentContact{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", mobileNo='").append(mobileNo).append('\'');
        sb.append(", seq=").append(seq);
        sb.append(", version=").append(version);
        sb.append(", address=").append(address);
        sb.append(", personOwner=").append(personOwner);
        sb.append('}');
        return sb.toString();
    }
}

